
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Egl
	{
		/// <summary>
		/// [EGL] Value of EGL_OBJECT_THREAD_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_THREAD_KHR = 0x33B0;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_DISPLAY_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_DISPLAY_KHR = 0x33B1;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_CONTEXT_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_CONTEXT_KHR = 0x33B2;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_SURFACE_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_SURFACE_KHR = 0x33B3;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_IMAGE_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_IMAGE_KHR = 0x33B4;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_SYNC_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_SYNC_KHR = 0x33B5;

		/// <summary>
		/// [EGL] Value of EGL_OBJECT_STREAM_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int OBJECT_STREAM_KHR = 0x33B6;

		/// <summary>
		/// [EGL] Value of EGL_DEBUG_MSG_CRITICAL_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int DEBUG_MSG_CRITICAL_KHR = 0x33B9;

		/// <summary>
		/// [EGL] Value of EGL_DEBUG_MSG_ERROR_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int DEBUG_MSG_ERROR_KHR = 0x33BA;

		/// <summary>
		/// [EGL] Value of EGL_DEBUG_MSG_WARN_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int DEBUG_MSG_WARN_KHR = 0x33BB;

		/// <summary>
		/// [EGL] Value of EGL_DEBUG_MSG_INFO_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int DEBUG_MSG_INFO_KHR = 0x33BC;

		/// <summary>
		/// [EGL] Value of EGL_DEBUG_CALLBACK_KHR symbol.
		/// </summary>
		[RequiredByFeature("EGL_KHR_debug")]
		public const int DEBUG_CALLBACK_KHR = 0x33B8;

		/// <summary>
		/// [EGL] eglDebugMessageControlKHR: Binding for eglDebugMessageControlKHR.
		/// </summary>
		/// <param name="callback">
		/// A <see cref="T:DebugProcKHR"/>.
		/// </param>
		/// <param name="attrib_list">
		/// A <see cref="T:IntPtr[]"/>.
		/// </param>
		[RequiredByFeature("EGL_KHR_debug")]
		public static int KHR(DebugProcKHR callback, IntPtr[] attrib_list)
		{
			int retValue;

			unsafe {
				fixed (IntPtr* p_attrib_list = attrib_list)
				{
					Debug.Assert(Delegates.peglDebugMessageControlKHR != null, "peglDebugMessageControlKHR not implemented");
					retValue = Delegates.peglDebugMessageControlKHR(callback, p_attrib_list);
					LogCommand("eglDebugMessageControlKHR", retValue, callback, attrib_list					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [EGL] eglQueryDebugKHR: Binding for eglQueryDebugKHR.
		/// </summary>
		/// <param name="attribute">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="value">
		/// A <see cref="T:IntPtr[]"/>.
		/// </param>
		[RequiredByFeature("EGL_KHR_debug")]
		public static bool QueryKHR(int attribute, IntPtr[] value)
		{
			bool retValue;

			unsafe {
				fixed (IntPtr* p_value = value)
				{
					Debug.Assert(Delegates.peglQueryDebugKHR != null, "peglQueryDebugKHR not implemented");
					retValue = Delegates.peglQueryDebugKHR(attribute, p_value);
					LogCommand("eglQueryDebugKHR", retValue, attribute, value					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [EGL] eglLabelObjectKHR: Binding for eglLabelObjectKHR.
		/// </summary>
		/// <param name="display">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="objectType">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="object">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="label">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("EGL_KHR_debug")]
		public static int KHR(IntPtr display, uint objectType, IntPtr @object, IntPtr label)
		{
			int retValue;

			Debug.Assert(Delegates.peglLabelObjectKHR != null, "peglLabelObjectKHR not implemented");
			retValue = Delegates.peglLabelObjectKHR(display, objectType, @object, label);
			LogCommand("eglLabelObjectKHR", retValue, display, objectType, @object, label			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("EGL_KHR_debug")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int eglDebugMessageControlKHR(DebugProcKHR callback, IntPtr* attrib_list);

			[RequiredByFeature("EGL_KHR_debug")]
			internal static eglDebugMessageControlKHR peglDebugMessageControlKHR;

			[RequiredByFeature("EGL_KHR_debug")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool eglQueryDebugKHR(int attribute, IntPtr* value);

			[RequiredByFeature("EGL_KHR_debug")]
			internal static eglQueryDebugKHR peglQueryDebugKHR;

			[RequiredByFeature("EGL_KHR_debug")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int eglLabelObjectKHR(IntPtr display, uint objectType, IntPtr @object, IntPtr label);

			[RequiredByFeature("EGL_KHR_debug")]
			internal static eglLabelObjectKHR peglLabelObjectKHR;

		}
	}

}
